package demo.practice.leetcode_offer;

public class Offer03 {


    public int findRepeatNumber(int[] nums) {
        int[] count = new int[nums.length];
        for (int num : nums) {
            if (count[num] > 0)
                return num;
            count[num]++;
        }
        return -1;
    }
}
